
CC = gcc

LIBS = main.o
LIBS += dict.o
LIBS += list.o
LIBS += hash.o
LIBS += sdl.o

CPPFLAGS = -I.

LDFLAGS = -lSDL -lSDL_ttf -lSDL_mixer -lSDL_image -lX11

TARGET ?= dict

.PHONY: $(TARGET)

all:clean $(TARGET)
	./dict

$(TARGET):$(LIBS)
	$(CC) $^ -o $@ $(LDFLAGS)

%.o:%.c
	$(CC) -c $< -o $@ $(CPPFLAGS)

clean:
	@rm $(LIBS) $(TARGET) -f

